package cn.itsource.pethome.domain;

import cn.itsource.pethome.constant.Constant;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product {
    private Long id;
    //商品名称
    private String name;
    //商品图片 多个图片路径以逗号隔开
    private String resources;
    //成本价
    private BigDecimal costprice;
    //售价
    private BigDecimal saleprice;
    //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    //上架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;

    //状态：0表示上架  -1表示下架
    private Integer state = Constant.DISABLED;

    //创建时间
    private Date createtime = new Date();

    //销量
    private Integer salecount = 0;

    //所属商家id
    private Shop shop;
    private Long shop_id;

    //商品详情
    private ProductDetail productDetail;
}
